//
//  BtnTableViewCell.m
//  homeworkForYC
//
//  Created by 苗钧豪 on 16/7/27.
//  Copyright © 2016年 苗钧豪. All rights reserved.
//

#import "BtnTableViewCell.h"

@implementation BtnTableViewCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        _btn1 = [[UIButton alloc]initWithFrame:CGRectZero];
        _btn2 = [[UIButton alloc]initWithFrame:CGRectZero];
        _btn3 = [[UIButton alloc]initWithFrame:CGRectZero];
        _btn4 = [[UIButton alloc]initWithFrame:CGRectZero];
        [self.contentView addSubview:_btn1];
        [self.contentView addSubview:_btn2];
        [self.contentView addSubview:_btn3];
        [self.contentView addSubview:_btn4];
    }
    return self;
}
- (void)layoutSubviews {
    [super layoutSubviews];
    _btn1.frame = CGRectMake(0, 0, self.frame.size.width / 4, self.contentView.frame.size.height);
    _btn2.frame = CGRectMake(self.frame.size.width / 4, 0, self.frame.size.width / 4, self.contentView.frame.size.height);
    _btn3.frame = CGRectMake(self.frame.size.width / 2, 0, self.frame.size.width / 4, self.contentView.frame.size.height);
    _btn4.frame = CGRectMake((self.frame.size.width / 4) * 3, 0, self.frame.size.width / 4, self.contentView.frame.size.height);
}
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
